package org.liao.springboot.webservice.ws.service;

import org.springframework.stereotype.Service;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

@WebService(serviceName = "WeatherService",name = "WeatherInterFace",portName = "WeatherPort"
        ,endpointInterface = "org.liao.springboot.webservice.ws.service.WeatherInterFace")
@Service
public class WeatherInterFaceImpl implements WeatherInterFace {
    @Override
    @WebResult(name = "WeatherInfo")
    public WeatherInfoResp getWeatherByCity(@WebParam(name = "weatherReq") WeatherInfoReq weatherInfo) {
        WeatherInfoResp weatherInfoResp=new WeatherInfoResp();
        weatherInfoResp.setCity(weatherInfo.getCity());
        weatherInfoResp.setResTime(System.currentTimeMillis());
        return weatherInfoResp;
    }
}
